.NET Micro Framework/.NET MCQ Set 2 Sample Test,Sample questions

Question:
An assembly is unloaded:

1.By using static method Unload()

2.By using non static method Unload()

3.By unloading its application domain

4.By unloading CLR

Posted Date:-2022-08-15 12:58:20


Question:
Because .NET treats all languages as equal, a class written in C# should be equivalent to a class written in VB.NET, and an interface defined in Managed C++ should be exactly the same as one that is specified in Managed COBOL. Languages must agree on the meanings of these concepts before they can integrate with one another.

Which of the following provides the specifications for this?

1.CLS

2.CTS

3.MSIL

4.CLI

Posted Date:-2022-08-15 12:52:28


Question:
Dot NET Framework programs are compiled into CPU independent instruction set, named:

1.Microsoft Interpreted Language

2.Microsoft Intermediate Language

3.Microsoft Virtual Language

4.Microsoft Common Language

Posted Date:-2022-08-15 12:53:15


Question:
How do string indexers treat strings?

1.Arrays of characters

2.1 to string length

3. A character

4.Binary code

Posted Date:-2022-08-15 12:27:21


Question:
How is concatenation of strings done?

1.Operator overloading

2.Reserved words

3.Method calls

4.Operator overloading and method calls

Posted Date:-2022-08-15 12:49:46


Question:
In ASP.NET, to add a custom control to a Web form, it is necessary to register with which of the following?

1.TagPrefix

2.Assemblyname

3.The namespace of the .dll that is referenced

4.All of these

Posted Date:-2022-08-15 12:39:52


Question:
In ASP.NET, which class is used to derive custom controls?

1.System.Web.UI.Customcontrol

2.System.Web.UI.Webcontrol

3.System.Web.UI.Customcontrols.Webcontrol

4.None of These

Posted Date:-2022-08-15 12:50:39


Question:
In ASP.NET, which control does not have any visible interface?

1.Repeater

2.Datagrid

3.Datalist

4.DropdownList

Posted Date:-2022-08-15 12:46:05


Question:
In ASP.NET, which of the following describes IsPostBack?

1.Method of the System.UI.Web.Page class

2.Method of the System.Web.UI.Page class

3.Read-only property of the System.Web.UI.Page class

4.None of these

Posted Date:-2022-08-15 12:37:06


Question:
In ASP.NET, which of the following is the extension of a web user control file?

1..asmx

2..ascx

3.ashx

4.aspx

Posted Date:-2022-08-15 12:09:44


Question:
In C#, which class is extended by every class directly or indirectly?

1.System

2.Drawing

3.Console

4.Object

Posted Date:-2022-08-15 12:47:15


Question:
In C#, which code converts a string to lowercase?

1.string.ToLower();

2.string.ToLower(string);

3.ToLower(string);

4.String = string.ToLower(string);

Posted Date:-2022-08-15 12:07:40


Question:
In C#, which of the following describes a local variable?

1.Can be used anywhere in the program

2.Must accept a class

3.Represents a class object

4. Declared within a method

Posted Date:-2022-08-15 11:52:31


Question:
In C#, which of the following describes two StringBuilder objects that contain the same string?

1.They are two different objects

2.All of these

3.They represent the same memory location

4.They are both changed when a change is made to either

Posted Date:-2022-08-15 12:23:44


Question:
In C#, which of the following does this code create? String mystring;

1.A class and a constructor

2.A class

3.A constructor

4.An object

Posted Date:-2022-08-15 12:16:33


Question:
In C#, which of the following is an instance variable?

1.Represents an attribute of an object

2.Is a method of a class

3.Is an object of a class

4.Is both an object of a class and a method of a class

Posted Date:-2022-08-15 12:34:30


Question:
In C#, which of the following is created from this code? class Test: Form { }

1.The class Test that inherits the class Form

2.The class Test : Form

3.The class Test : Form and the class Test that inherits the class Form

4.The class Form that inherits the class Test

Posted Date:-2022-08-15 12:08:35


Question:
In C#, which of the following is the proper header for a class that intends to use an interface?

1.class MyClass ; Iface

2.class MyClass : Iface

3.class MyClass {IFace}

4. class MyClass Iface

Posted Date:-2022-08-15 11:53:37


Question:
In C#, which of the following is used to define two methods in a single class with the same name but with different sets of argument types?

1.Multiplexing

2.Overriding

3.Overloading

4.Duplexing

Posted Date:-2022-08-15 12:29:13


Question:
In C#, which of the following is used to return a thread from a suspended state?

1.Resume

2.Restart

3.Interrupt

4.Pulse

Posted Date:-2022-08-15 12:32:07


Question:
In C#, which type of variable is declared inside a method?

1.Serial

2.Private

3.Static

4.Local

Posted Date:-2022-08-15 11:49:06


Question:
In the ASP.NET server control, which provides an alternative way of displaying text on web page?

1.< asp:label >

2.< asp:button >

3.< asp:listitem >

4.None of These

Posted Date:-2022-08-15 11:51:09


Question:
In the body of a method, which variable does C# use to refer to the current object whose method is being invoked?

1. that

2.do

3.this

4.call

Posted Date:-2022-08-15 11:50:07


Question:
In which of the following GC Collection mode does the garbage collector determine whether the current time is optimal to reclaim objects?

1.Forced

2.Optimized

3.Concurrent

4.Parallel

Posted Date:-2022-08-15 11:54:36


Question:
In which of the following Generations does the CLR allocate memory for new objects?

1.Generation 3

2.Generation 0

3.Generation 1

4.Generation 2

Posted Date:-2022-08-15 12:21:39


Question:
Suppose you want to eliminate duplicate elements from the array
int[] source = { 7, 4, 1, 3, 9, 8, 6, 7, 2, 1, 8, 15, 8, 23}

and sort the elements in descending order using LINQ in .Net framework 4.0. Which of the following statements can you use?

1.var result = (from s in source orderby s select distinct s).Descending();

2.var result = (from s in source orderby s descending select s).Distinct();

3.var result = select distinct s from s in source sortby s descending;

4.var result = from s in source orderby s descending group p by s select s;

Posted Date:-2022-08-15 13:02:02


Question:
The primary building block of the .NET framework is

1.ado.NET

2.assembly

3.JIT

4.manifest

Posted Date:-2022-08-15 12:53:58


Question:
The XML web services of .NET framework are built on :

1.SOAP

2.XML

3.WSDL

4.All of the above

Posted Date:-2022-08-15 12:56:57


Question:
Where are the String class and Char structure found?

1.System namespace

2.System.Text namespace

3.System.Strings namespace

4.System.Chars namespace

Posted Date:-2022-08-15 11:59:03


Question:
Where is the application domain created?

1.Outside a Process

2.Inside a Process

3.Can be created&nbsp;&nbsp;in both the places

4.None of the above

Posted Date:-2022-08-15 12:55:06


Question:
Which action will occur when a method detects that a problem has occurred?

1.The method will catch an exception.

2.The method will try and catch an exception.

3.The method will throw an exception.

4.The method will try an exception.

Posted Date:-2022-08-15 12:30:05


Question:
Which class are exception objects derived from?

1.System

2.Exception

3.Catch

4.Event

Posted Date:-2022-08-15 12:30:49


Question:
Which method should you consider using in order to develop an application that meets the following requirements? • A different ASPX page is displayed when the application's original URL is entered • After the page executes, the original URL is not visible to users • A single client browser request is sufficient for the execution of a page

1.HttpContext.Current.RewritePath

2.HttpContext.Current.RemapHandler

3.HttpContext.Current.ToString

4.HttpContext.Current.GetType

Posted Date:-2022-08-15 12:48:18


Question:
Which methods are used to lock and unlock an object?

1.Enter and Exit

2. Lock and Unlock

3.Close and Allow

4.Close and Open

Posted Date:-2022-08-15 12:35:32


Question:
Which of the following .NET framework classes can be used for Custom Parallel Partitioning ?

1.ConcurrentBag<T>

2.OrderablePartitioner<TSource>

3.ConcurrentQueue<T>

4.BlockingCollection<T> Class

Posted Date:-2022-08-15 12:18:24


Question:
Which of the following actions does an abstract class create?

1.May extend another class

2.All of these

3.May contain constructors

4.May contain instance variables

Posted Date:-2022-08-15 12:17:31


Question:
Which of the following defines a delegate?

1.A means of passing arrays into methods

2. A class that encapsulates methods

3.A Washington representative

4.A substitue for an inherited method

Posted Date:-2022-08-15 12:03:52


Question:
Which of the following defines synchronization?

1.Delay a thread until there is sufficient memory and work to keep it up

2.Ensure that two concurrently-executing threads or processes do not execute specific portions of a program at the same time

3.Make every thread start and end at the same time

4.Make every thread do the same thing

Posted Date:-2022-08-15 12:10:35


Question:
Which of the following describes what this code snippet implies? namespace TestApplication { class HelloWorld {} }

1.TestApplication class contains the class HelloWorld

2.TestApplication class contains the namespace HelloWorld

3.TestApplication namespace contains the class HelloWorld

4.Compilation error

Posted Date:-2022-08-15 12:04:56


Question:
Which of the following does BCL stand for?

1.Bass Class Language

2.Binary Class Language

3.Binary Common Libraries

4.Base Class Libraries

Posted Date:-2022-08-15 12:45:12


Question:
Which of the following elements can be part of an Assembly:

1.Type Metadata

2.MSIL

3.A set of resources

4.All of the above

Posted Date:-2022-08-15 13:00:14


Question:
Which of the following exceptions is thrown when a member/class lookup results in more than one member/class matching the lookup criteria?

1.FileNotFoundException

2.System.Reflection.AmbiguousMatchException

3.AppDomain.UnhandledException

4.FormatException

Posted Date:-2022-08-15 12:20:53


Question:
Which of the following Generations contains the longest surviving objects?

1.Generation 0

2.Generation 1

3.Generation 3

4.Generation 2

Posted Date:-2022-08-15 12:51:40


Question:
Which of the following is a valid syntax of entry point for all C# programs?

1.Static void Main(string[] args)

2.static Main(string[] args)

3.static void Main(string[] args)

4.static Main(string args)

Posted Date:-2022-08-15 12:28:16


Question:
Which of the following is not a component of the .NET framework?

1.Common Language Specification

2.JVM

3.Metadata and Assemblies

4.Windows Forms

Posted Date:-2022-08-15 11:48:04


Question:
Which of the following is not a method of FileSystem class?

1.FileClose

2.FileInput

3.LineInput

4.LOF

Posted Date:-2022-08-15 12:59:09


Question:
Which of the following is not contained in the ThreadPriority enumeration?

1.Lowest

2.ThreadPriority enumeration contains all of these.

3.Belownormal

4.Highest

Posted Date:-2022-08-15 12:19:34


Question:
Which of the following is the correct way to define a namespace alias in VB.NET?

1.Using MyNamespace = MyComponent.Web.UI.WebControls;

2.Using MyComponent.Web.UI.WebControls as MyNamespace;

3.Using MyComponent.Web.UI.WebControls = MyNamespace;/div>

4.None of These

Posted Date:-2022-08-15 12:36:18


Question:
Which of the following is the first event to be triggered in an .aspx page?

1.Page.Load

2.Page.PreRender

3.Page.PreRender

4.None of these

Posted Date:-2022-08-15 12:26:29


Question:
Which of the following is used to create a string literal exclude escape sequence?

1.$string

2.!string

3.#string

4.@string

Posted Date:-2022-08-15 12:33:19


Question:
Which of the following often results in an event?

1.Not an object type

2. Code used to force a user action

3.The result of a party

4.The result of a user action

Posted Date:-2022-08-15 12:25:49


Question:
Which of the following statements is correct with regard to .NET framework managed web pages?

1.They interact directly with the runtime

2.They do not execute in the native code language

3.They are interpreted and scripted

4.All of the above

Posted Date:-2022-08-15 12:56:02


Question:
Which type of block encloses code that could throw an exception?

1.Exception

2.Catch

3.Try

4.Error

Posted Date:-2022-08-15 12:06:43


Question:
Which type of code is the following? public class A { IEmailSender _emailSender public A(IEmailSender emailSender) { _emailSender = emailSender; } private void SendEmail() { _emailSender.Send(); } }

1.Inheritance

2.Dependency injection

3.Tightly coupled classes

4.Method overloading

Posted Date:-2022-08-15 12:22:34


Question:
Your Web application, ABCWebApp1, is configured to use Windows Authentication. After granting a specific group NTFS permissions to access a specific file named ABC.doc, you need to ensure that users not belonging to this group cannot access the file. Which of the following should you include to ensure unauthorized access?

1.Configure the machine.config file to include the <authentication mode="[None]"> element

2.Configure the Web.config file to include the <identity impersonate="true"/> element

3.Configure the app.config file to include the <authentication mode="[None]"> element

4.Configure the machine.config file to include the <identity impersonate="true"/> element

Posted Date:-2022-08-15 12:24:37


More MCQS

  1. .NET Framework MCQ
  2. .NET MCQ Set 1
  3. .NET MCQ Set 2
  4. .NET MCQ Set 3
  5. .NET MCQ Set 4
  6. .NET MCQ Set 5
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!